<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>博客分类管理</title>
<link rel="stylesheet" href="css/layui.css" media="all">
<link rel="stylesheet" href="css/modules/layer/default/layer.css" />
<script type="text/javascript" src="js/angularJS/angular.min.js"></script>
<script type="text/javascript" src="js/base.js"></script>
<script type="text/javascript" src="js/service/blogTypeService.js"></script>
<script type="text/javascript" src="js/controller/baseController.js"></script>
<script type="text/javascript" src="js/controller/blogTypeController.js"></script>
<script src="js/layui.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script src="js/lay/modules/layer.js"></script>
<script type="text/javascript" src="js/lay/modules/form.js"></script>
</head>

<body ng-app="blogManager" ng-controller="blogTypeController" ng-init="pageInit(1,3)">

	<div style="margin-left: 20px;">
		<button class="layui-btn" ng-click="saveForm()">
			<i class="layui-icon">&#xe608;</i> 添加
		</button>
		<button class="layui-btn" ng-click="del()">
			<i class="layui-icon">&#xe640;</i> 删除
		</button>
			<input type="text" ng-model="searchEntity.typename" name="title" style="width:240px;float: right;margin-right: 200px" class="layui-input">    
			<button class="layui-btn" ng-click="pageInit(1,3)"  style="float: right;margin-right: -350px">
				<i class="layui-icon">&#xe640;</i> 搜索
			</button>
	</div>

				

	<table class="layui-table" lay-even lay-skin="cols">
		<colgroup>
			<col width="65">
			<col width="50">
			<col width="350">
			<col width="50">
			<col width="200">
		</colgroup>
		<thead>
			<tr>
				<th>选择</th>
				<th>ID</th>
				<th>类别名称</th>
				<th>排序</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<tr ng-repeat="blogType in blogTypeList">
				<td><input type="checkbox"
					ng-click="updateSelectOption($event,blogType.typeId)"></td>
				<td>{{blogType.typeId}}</td>
				<td>{{blogType.typename}}</td>
				<td>{{blogType.typeorder}}</td>
				<td><button type="button" ng-click="saveForm(blogType.typeId)"
						class="layui-btn">修改</button></td>
			</tr>
		</tbody>
	</table>
	<!--分页  -->
		<div id="page"></div>
</body>

<form class="layui-form" style="display: none;" id="myForm">
	<div class="layui-form-item">
		<label class="layui-form-label">类别名称</label>
		<div class="layui-input-block">
			<input type="text" name="typename" ng-model="entity.typename"
				required lay-verify="required" placeholder="请输入类别名称"
				autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">排序</label>
		<div class="layui-input-block">
			<input type="text" name="typeorder" ng-model="entity.typeorder"
				required lay-verify="required" placeholder="请输入排序号"
				autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			<button class="layui-btn" lay-submit lay-filter="formDemo"
				ng-click="save()">保存</button>
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</div>
	</div>
</form>
<!-- 	 -->

</html>